//C17.8:setf.cpp -- using setf() to control formatting
#include <iostream>

int main(void)
{
    using std::cout;
    using std::endl;
    using std::ios_base;

    int temprature = 63;
    cout << "Todya's water temprature: ";
    cout.setf(ios_base::showpos);    // show plus sign
    cout << temprature << endl;

    cout << "For our programming friends, that's\n";
    cout << std::hex << temprature << endl;    // use hex
    cout.setf(ios_base::uppercase);    // use uppercase in hex
    cout.setf(ios_base::showbase);    //  use 0X prefix for hex
    cout << "or\n";                                      
    
    cout << temprature << endl;
    cout << "How " << true << "!    oops -- How ";
    cout.setf(ios_base::boolalpha);
    cout << true << "!\n";
}
